<div>
  <h1>
    用户(<%= @users.total_entries %>)
  </h1>
</div>

<div>
  <table class="table table-striped">
    <tr>
      <th>ID</th>
      <th>姓名</th>
      <th>角色</th>
      <th>手机</th>
      <th></th>
    </tr>

    <% @users.each do |user| %>
      <tr>
        <td><%= user.id %></td>
        <td><%= user.name %></td>
        <td><%= user.roles.map(&:name).join(",") %></td>
        <td><%= user.mobile %></td>
        <td align="right">
        </td>
      </tr>
    <% end -%>
  </table>

  <%= will_paginate @users %>
</div>


